package ExampleSCM;

public class VicePresident extends Approver{
    private String name;

    public VicePresident(String name) {
        this.name = name;
    }

    @Override
    public void processRequest(PurchaseRequest request) {
        System.out.println("副董事长["+name+"]审批");
        if(request.getAmount()<=100000){
            System.out.println("该次采购金额小于10万元，副董事长有权审批");
            System.out.println("副董事长["+name+"]审批完成");
            System.out.println("采购内容："+request.getPurpose()+"\t采购数量："+request.getNumber()+"采购金额：\t"+request.getAmount());
        }else{
            System.out.println("该次采购金额大于10万元，副董事长无权审批，移交董事长");
            successor.processRequest(request);
        }
    }
}
